package com.ds.infrastructure.hyperspace.console.model.response.operator;

import com.ds.infrastructure.hyperspace.console.entity.table.TbOperator;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author: yaozhendong
 * @create: 2019-09-25 17:57
 **/
@Data
@NoArgsConstructor
public class GetOperatorVO {
    private Long id;

    private String operatorName;

    private Integer operatorType;

    private String description;

    private Date gmtModified;

    private Date gmtCreate;

    private String operatorParams;

    public static GetOperatorVO toVO(TbOperator entity) {
        GetOperatorVO getOperatorVO = new GetOperatorVO();
        getOperatorVO.setId(entity.getId());
        getOperatorVO.setOperatorName(entity.getOperatorName());
        getOperatorVO.setOperatorType(entity.getOperatorType());
        getOperatorVO.setGmtModified(entity.getGmtModified());
        getOperatorVO.setGmtCreate(entity.getGmtCreate());
        getOperatorVO.setOperatorParams(entity.getOperatorParams());
        getOperatorVO.setDescription(entity.getDescription());
        return getOperatorVO;

    }
}
